<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.7.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function() {
				
				$("button").eq(0).click(function(){
					$("img").animate({
						"left": "0",
						"width": "50px"
					}, 0, function() {
						$("img").css("transform", "rotateY(0deg)")
					}).animate({
						"left": "300px",
						"width": "200px"
					}, 2000, function() {
						$("img").css("transform", "rotateY(180deg)")
					}).animate({
						"left": "0",
						"width": "50px"
					}, 2000, function() {
						$("img").css("transform", "rotateY(0deg)")
					})
				})
				$("button").eq(1).click(function(){
					$("img").stop(true)
				})
			})
		</script>
	</head>
	<body>
		<button>开始动画</button>
		<button>停止动画</button><br>
		<img src="img/fish.png" width="50px" style="position: relative;">
	</body>
</html>
